<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="pink">
        <div class="img0"></div>
        <div class="img1"></div>
    </div>
    <div class="yellow">
        <div class="img2"></div>
    </div>
    <div class="black">
        <div class="img3"></div>
    </div>

</body>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    body {
        padding-bottom: 10000px;
    }

    .pink {
        position: fixed;
        top: 0;
        width: 100%;
        height: 100vh;
        background-color: #EEF6FE;
    }

    .img0 {
        width: 400px;
        height: 700px;
        background: url(section-color-white-1.png) no-repeat center center /cover;
        position: relative;
    }

    .img1 {
        width: 400px;
        height: 700px;
        margin-left: 400px;
        background: url(section-color-white-2.png) no-repeat center center /cover;
        position: absolute;
        left: -400px;
        top: 0;
    }

    .yellow {
        position: fixed;
        top: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: #fff;
    }

    .img2 {
        width: 400px;
        height: 700px;
        background: url(section-color-yellow-1.png) no-repeat center center /cover;
    }

    .black {
        position: fixed;
        top: 0px;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: #000000;
    }

    .img3 {
        width: 400px;
        height: 700px;
        background: url(section-color-black-1.png) no-repeat center center /cover;
    }
</style>
<script>
    window.onscroll = () => {
        const contentHeight = document.querySelector('.pink').offsetHeight
        const num = document.documentElement.scrollTop / contentHeight
        document.querySelector('.yellow').style.height = num * contentHeight + 'px'
        if (num > 1) {
            document.querySelector('.black').style.height = (num - 1) * contentHeight + 'px'
        }
    }
</script>

</html>